DEMO_MESSAGE["Altering Defaults","This is a demo version of HENRIETTA's","BOOK of SPELLS. Although you can","temporarily alter the settings in this","section they will be ignored by the","program."]
Fade 3
Wait 3*16
Paper 0
Clw
CLEAR_BANKS
Gosub CLEAR_ARRAYS
X=Free
Run "game.amos"
Else
If(MK and ZN=10)
Hide On
Gosub WRITE_DEFAULT_SETTINGS
Pen 15
Paper 7
Show On
Else
If(MK and ZN=3)
CPENALTY$=""
Goto TIME_PENALTY
Else
If(MK and ZN=9)
Goto WORD_LIST_EDITOR
Else
If(MK and ZN=12)
WRDLST=5
WRDTYP=0
Goto MAGIC_LIST
Else
If(MK and ZN=8)
Goto HELP_PARENT
Else
If(MK and ZN=11)
Fade 3
Wait 3*16
Goto RESULT_VIEW
End If
End If
End If
End If
End If
End If
End If
If MK
If ZN=1
SOUND=SOUND xor 1
Wait Vbl
Locate 23,3 : Print MNU$(0,SOUND)
Else
If ZN=5
VAR4=VAR4 xor 1
Wait Vbl
Locate 23,11 : Print MNU$(4,VAR4)
Else
If ZN=6
VAR5=VAR5 xor 1
Wait Vbl
Locate 23,13 : Print MNU$(5,VAR5)
Else
If ZN=7
CONCEAL=CONCEAL xor 1
Wait Vbl
Locate 23,15 : Print MNU$(6,CONCEAL)
Else
If ZN=2
LEVEL=LEVEL+1+(LEVEL=2)*3
Wait Vbl
Locate 23,5 : Print MNU$(1,LEVEL)
Else
If ZN=4
SECTION=SECTION+1+(SECTION=5)*6
Wait Vbl
Locate 23,9 : Print MNU$(3,SECTION)
End If
End If
End If
End If
End If
End If
End If
If MK and(ZN>=1 and ZN<=7) Then Repeat : Until Mouse Key=0
Goto TEACHER_LOOP
TIME_PENALTY:
Locate 23,7 : Print CPENALTY$-" ";"_ "
Clear Key
Repeat
K$=Lower$(Inkey$)
Until K$<>"" or K<>0
If((K$>="0") and(K$<="9") and Len(CPENALTY$)<2)
CPENALTY$=CPENALTY$+K$
Else
If((K$=Chr$(13)) and(CPENALTY$=""))
Goto TIME_EXIT
Else
If((K$=Chr$(13)) and(CPENALTY$<>""))
CPENALTY=Val(CPENALTY$)
Goto TIME_EXIT
Else
If((K$=Chr$(8)) and(CPENALTY$<>""))
CPENALTY$=Left$(CPENALTY$,Len(CPENALTY$)-1)
End If
End If
End If
End If
Goto TIME_PENALTY
TIME_EXIT:
If CPENALTY>50 Then CPENALTY=50
Locate 23,7 : Print Str$(CPENALTY)-" ";" "
Goto TEACHER_LOOP
WORD_LIST_EDITOR:
Hide On
Fade 3
Wait 3*16
Paper 0
Clw
Screen Open 1,640,200,4,Hires : MDE=1
Reserve Zone 64
Curs Off
Scroll Off
Flash Off
Unpack 11
Colour 19,0
Fade 3,$0,$FFF,$AAA,$666,,,,,,,,,,,,,,,,$FA0
Wait 3*16
Show On
Z=1
For X=0 To 1
For Y=0 To 4
Set Zone Z,52+(X*271),62+(Y*24) To 319+(X*271),82+(Y*24)
Locate 0,24 : Centre " Press <F1> or <Esc> to leave HELP "
Paper 0
Locate 2,2 : Print "a - Question difficulty;"
Locate 2,3 : Print "b - Student's name and date exercise"
Locate 6,4 : Print "completed (As set by"
Locate 6,5 : Print "the user);"
Locate 2,6 : Print "c - Set of results being viewed. The"
Locate 6,7 : Print "last ten sets are stored on disc;"
Locate 2,8 : Print "d - The length of words used during"
Locate 6,9 : Print "exercise;"
Locate 2,10 : Print "e - Name of exercise;"
Locate 2,11 : Print "f - The number of extra questions asked. To successfully complete an"
Locate 6,12 : Print "exercise, eight questions must be answered correctly. If more than"
Locate 6,13 : Print "eight are required, the number of extra questions posed is shown here;"
Locate 2,14 : Print "g - The correct answer;"
If((RESULT_GAME=1 or RESULT_GAME=2) and SECT=0) or SECT=1 or SECT=2
Locate 2,15
Print "h - The actual answer given by the student or OK if the answer is correct."
Locate 6,16 : Print "'Not attempted' means <Esc> was pressed before this question was"
Locate 6,17 : Print "reached, or that the exercise was not attempted;"
Locate 2,18 : Print "i - Number of clues requested;"
Locate 2,19 : Print "j - There are seven buttons on the screen. These allow you to navigate"
Locate 6,20 : Print "through the results, print the current set of results, or access"
Locate 6,21 : Print "this help page. ";
Inverse On
Print " Shortcut: press a number to load that set (0=10). "
Inverse Off
End If
If((RESULT_GAME=3 or RESULT_GAME=5) and SECT=0) or SECT=3 or SECT=5
Locate 2,15 : Print "h - The 'clue' word given;"
Else
If(RESULT_GAME=4 and SECT=0) or SECT=4
Locate 2,15 : Print "h - Letters tried by the student;"
End If
End If
If(RESULT_GAME>=3 and SECT=0) or SECT>=3
Locate 2,16 : Print "i - The actual answer given by the student or OK if the answer is correct."
Locate 6,17 : Print "'Not attempted' means <Esc> was pressed before this question was"
Locate 6,18 : Print "reached, or that the exercise was not attempted;"
Locate 2,19 : Print "j - Number of clues requested;"
Locate 2,20 : Print "k - There are seven buttons on the screen, these allow you to navigate"
Locate 6,21 : Print "through the results, print the current set of results, or access"
Locate 6,22 : Print "this help page. ";
Inverse On
Print " Shortcut: press a number to load that set (0=10). "
Inverse Off
End If
Ink 1 : Box 328,8 To 618,84
Draw 328,24 To 618,24
Draw 328,40 To 618,40
Draw 328,56 To 618,56
Draw 376,40 To 376,84
Draw 570,40 To 570,84
Locate 43,8 : Print "g"
Locate 44,2 : Print "a b c"
Locate 44,4 : Print "d e f"
Locate 43,10
Inverse On
If((RESULT_GAME=1 or RESULT_GAME=2) and SECT=0) or SECT=1 or SECT=2
Print Space$(15)+"j"+Space$(16)
Else
Print Space$(15)+"k"+Space$(16)
End If
Inverse Off
If((RESULT_GAME=1 or RESULT_GAME=2) and SECT=0) or SECT=1 or SECT=2
Locate 58,8 : Print "h"
Locate 74,8 : Print "i"
End If
If((RESULT_GAME=3 or RESULT_GAME=5) and SECT=0) or SECT=3 or SECT=5
Draw 424,40 To 424,84
Locate 50,8 : Print "h"
Locate 62,8 : Print "i"
Locate 74,8 : Print "j"
End If
If(RESULT_GAME=4 and SECT=0) or SECT=4
Draw 464,40 To 464,84
Locate 52,8 : Print "h"
Locate 64,8 : Print "i"
Locate 74,8 : Print "j"
End If
Screen To Front 2
Clear Key
Repeat
K$=Inkey$
K=Scancode
Until K=$45 or(K=$50)
Screen To Front 1
Show On
Goto RESULT_LOOP
RESULT_PRINT:
DEMO_MESSAGE["Printing Results","This is a demo version and there","are no printing facilities available.","","",""]
Goto RESULT_LOOP
'
VARIABLE_LOAD:
SOUND=1
LEVEL=1
CPENALTY=20
SECTION=0
VAR4=1
VAR5=0
CONCEAL=0
WRDTYP=0
DATE$=""
Return
'
DISK_ERROR_DEFAULTS:
Pen 0 : Hide On : Boom
XW=Screen Width(Screen)
Get Block 3,0,80,XW,48
Ink 15+(MDE=1)*12
Bar 32,83 To XW-32,125
Paper 15+(MDE=1)*12
Locate 0,11 : Centre "Disc read error!"
Locate 0,13 : Centre " "
Cdown : Centre "Press any key."
Clear Key
Repeat
Until(Inkey$<>"") or Mouse Key<>0
Bell
Put Block 3
Del Block 3
Paper 0
Return
'
DISK_READ_ERROR_HIRES:
Close
Hide On
Boom
Get Block 3,32,80,608-32,125-80
Ink 3
Bar 32,83 To 608,125
Pen 0
Paper 3
Locate 0,11 : Centre "Insert BOOK of SPELLS disc"
Locate 0,12 : Centre "into the current drive"
Locate 0,14 : Centre "Press any key to retry"
Clear Key
Repeat
Until Inkey$<>"" or Mouse Key<>0
Bell
Put Block 3
Del Block 3
F$=Dir First$("*.*")
Resume
'
DISK_WRITE_ERROR:
Close
Pen 0
Hide On
Boom
XW=Screen Width(Screen)
Get Block 3,0,10*8,XW,48
Ink 15+(MDE=1)*12
Bar 32,83 To XW-32,125
Paper 15+(MDE=1)*12
Locate 0,11 : Centre "Disk write error!"
Locate 0,13 : Centre " "
Cdown : Centre "Press any key."
Clear Key
Repeat
Until(Inkey$<>"" or Mouse Key<>0)
Bell
Put Block 3
Update
Put Block 3
Update
Del Block 3
Paper 0
Resume DEFALTS_RESUME
'
DISK_WRITE_ERROR_RESULTS:
Close
Hide On
Boom
Get Block 3,0,10*8,640,48
Ink 15+(MDE=1)*12
Bar 32,83 To 608,125
Paper 15+(MDE=1)*12
Locate 0,11 : Centre "Disk write error!"
Locate 0,13 : Centre " "
Cdown : Centre "Press any key."
Clear Key
Repeat
Until(Inkey$<>"" or Mouse Key<>0)
Bell
Put Block 3
Del Block 3
Paper 0
Resume RESULTS_RESUME
'
WRITE_DEFAULT_SETTINGS:
DEMO_MESSAGE["Saving Defaults","This is a demo version and although","you may alter the settings here,","the program will still use the","restricted 'demo' settings.",""]
Return
'
DEFALTS_RESUME:
On Error Goto BBER
Put Block 1
Del Block 1
Return
'
CREATE_NEW_RESULTS:
Close
Ink 1
Pen 1
Gosub DISK_ERROR_DEFAULTS
Resume CREATE_RESUME
'
CREATE_RESUME:
Ink 1
Pen 1
RESULTS_RESUME:
On Error Goto DISK_WRITE_ERROR_RESULTS
Open Out 1,"DATA/RESULTS"+Str$(RESULT_SET)-" "+".DAT"
Print #1,"LOW"
Print #1,"Scetlander"
Print #1,DATE$
Print #1,0
Print #1,5
For G=1 To 5
Print #1,0
For A=0 To 7
A$=WRD$(Rnd(T0TWRD))
Print #1,A$
Print #1,""
Print #1,"Not attempted"
Print #1,""
Print #1,""
Print #1,A$
Next A
Next G
Close 1
On Error Goto BBER
Goto RESULT_ERROR_RESUME
'
RETRIEVE_RESULTS:
RESULT_GAME=1
On Error Goto CREATE_NEW_RESULTS
Open In 1,"DATA/RESULTS"+Str$(RESULT_SET)-" "+".DAT"
Input #1,DIF$
Input #1,NAM$
Input #1,DAT$
Input #1,SECT
Input #1,WLEN
For G=1 To 5
Input #1,QUESTION(G)
I=0
For A=0 To 7
Input #1,RESULT$(G,I)
Input #1,RESULT$(G,I+1)
Input #1,RESULT$(G,I+2)
Input #1,RESULT$(G,I+3)
Input #1,RESULT$(G,I+4)
Input #1,RESULT$(G,I+5)
I=I+6
Next A
Next G
Close 1
On Error Goto BBER
Goto RESULT_LOOP
'
DISK_WRITE_ERROR_WORDS:
Close
Pen 0
Hide On
Boom
Get Cblock 3,0,10*8,320,48
Ink 15+(MDE=1)*12
Bar 32*2,83 To 288*2,125
Paper 15+(MDE=1)*12
Locate 0,11 : Centre "Disk write error!"
Locate 0,13 : Centre " "
Cdown : Centre "Press any key."
Clear Key
Repeat
Until(Inkey$<>"" or Mouse Key<>0)
Bell
Put Cblock 3
Update
Put Cblock 3
Update
Del Cblock 3
Paper 0
Resume 3991
3991
Goto RESTART_WORD_EDIT
'
NOISE_BELL:
If SOUND=1 Then Bell
Return
'
Procedure CLEAR_HELP_WINDOW
For BB=1 To 19
Locate 2,1+BB
Print Space$(74);
Next BB
End Proc
Procedure SPACER[SPC$,SPCSIZE]
Lprint SPC$+Space$(SPCSIZE-Len(SPC$));
End Proc
Procedure DEMO_MESSAGE[T1$,S1$,S2$,S3$,S4$,S5$]
Freeze : Synchro Off : Bell
Screen Open 7,320,90,4,Lowres : Curs Off : Palette ,$F0,$F00,$FF0 : Cls 0
Screen Display 1,,,,
Ink 2 : Bar 0,0 To 320,90 : Ink 1 : Box 2,2 To 318,88 : Paper 2
Clear Key : Wait Key : Screen Close 7 : Update On : Synchro On
End Proc
Procedure CLEAR_BANKS
For I=1 To 14
Erase I
Next
End Proc
BBER:
DEMO_MESSAGE["Error Occured","An error from which the DEMO cannot","recover has occured. The error was","number"+Str$(Errn)+". Press any key to return","to the Workbench.",""]